﻿@model IEnumerable<PerformanceAssessment.Models.Team>

@{
    ViewBag.Title = "Skills Assignment";
}

<h2>Evaluated Skills per Team</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
    function editSkills() {
        $.get('@Url.Action("SkillsPerTeam","Skills")', { teamId: $("#teamsSel option:selected").val() }, function (data) {
            $('#skillSelection').html(data);
        }); 
    }
</script>

<p>
    @Html.Label("Teams") <br />
    @Html.DropDownList("teamsSel", new SelectList(Model, "ID", "Name"))
    <br/>
    <input type="button" value="Edit Skills" onclick="editSkills()"/>
</p>
<div id="skillSelection" >
</div>
<br />
<div>
    @Html.ActionLink("Back to List", "Index")
</div>